import request from '@/utils/request'

// 获取邮箱的接口
export function getEmail(params) {
    return request({
        url: `/online/flycare/admin/notification`,
        method: 'GET',
        params: params
    })
}

// 删除邮箱
export function deleteEmails(params,data) {
    return request({
        url: `/online/flycare/admin/notification`,
        method: 'DELETE',
        params: params,
        data: data
    })
}

// 修改邮箱发送权限
export function editEmail(id, informType,params) {
    return request({
        url: `/online/flycare/admin/notification/${id}/send/0/inform/${informType}`,
        method: 'POST',
        params:params
    })
}

// 增加邮箱
export function addEmail(data) {
    return request({
        url: `/online/flycare/admin/notification`,
        method: 'POST',
        data: data
    })
}

// 获取邮箱详情
export function getEmailDetail(id,params) {
    return request({
        url: `/online/flycare/admin/notification/${id}`,
        method: 'GET',
        params:params
    })
}

//获取已选择的用户
export function getCurrentUserId(params){
    return request({
        url: `/online/flycare/admin/notification/user`,
        method: 'GET',
        params:params
    })
}

// 获取operator下的所属用户
export function getUserPage(params) {
    return request({
      url: '/online/authorization/admin/user/account-list',
      method: 'GET',
      params
    })
  }